# # import random

# # random.seed(50)
# # print(random.randint(1,50))



# import random
# random.seed()  # 使用任意整数（如42）
# print(random.randint(1, 456456))  # 输出固定值（如37，种子为42时）

# print(1.1+2.2 == 3.3)

# print(f"{'hello':10>}")

# import random

# random.seed()

# print(random.randint(1,100))


# tmp = input("请输入温度:\n")

# if(tmp[-1] == 'f' or tmp[-1] =='F'):
#     print(f"{(eval(tmp[0:-1])-32)/1.8}c")
# elif (tmp[-1] == 'c' or tmp[-1] =='C'):
#     print(f"{eval(tmp[0:-1])*1.8+32}f")
# else:
#     print("温度格式有误")

# st = "abcde"
# print(st[0:-1])


# tmp = input("输入温度")

# if tmp[-1] in ['f','F']:
#     print(f"转换后的摄氏温度是:{(eval(tmp[0:-1])-32)/1.8 :.2f}")
# elif tmp[-1] in ['c','C']:
#     print(f"转换后的华氏温度是:{eval(tmp[0:-1])*1.8+32 :.2f}")
# else:
#     print("输入格式不对")


# def getNum():
#     nums = []
#     istr = input("请输入数字,回车退出")
#     while istr != '':
#         nums.append(int(istr))
#         istr = input("请输入数字,回车退出")
#     return nums

# def mean(numbers):
#     sum = 0.0
#     size = len(numbers)
#     for val in numbers :
#         sum += val
#     return sum / size

# def dev(numbers,mean):
#     sum = 0.0
#     for val in numbers:
#         sum += (val-mean)**2
#     return pow(sum/len(numbers),0.5)

# def mid(numbers):
#     new = numbers.sort()
#     size = len(numbers)
#     if size % 2 == 0:
#         return (numbers[size//2-1] + numbers[size//2]) / 2
#     else:
#         return numbers[size//2]

# n = getNum()
# m = mean(n)
# print(f"平均值:{m:.2f} 标准差:{dev(n,m):.2f} 中位数:{mid(n)}")


# text = "a b c d e e e a  b g f d f d s e d c d s x"

# obj = text.split()
# dict = {}
# for val in obj:
#     dict[val] = dict.get(val,0)+1
# print(dict)



# txt = [9,4,7,8,5,2,1,4,5,2,3,1,2,5,4,2]
# txt = sorted(txt)
# dict = {}
# for val in txt:
#     dict[val] =  dict.get(val,0)+1

# print(dict)

# obj = str(1)
# print(obj)

# obj = [1,5,8,9,6,3,3,3]
# print(type(obj))

# obj = tuple(obj)
# print(obj)
# print(type(obj))
# obj = list(obj)

# obj = set(obj)
# print(obj)
# print(type(obj))

# # a = dict(1:"jfd",2:"gfd",3:"gfsd")

# # a = {1:"jfd",2:"gfd",3:"gfsd"}

# # a = dict([(1,'1'),(2,2),(3,3)])
# a = dict(a=1 , b = 2 , c=3)
# print(a)

    
# while True:
#     tmp = input("请输入温度,f或c结尾")
#     if tmp == '' :
#         break
#     if tmp[-1] in ['f','F'] :
#         print(f"你的华氏温度转换为设置温度为->{(eval(tmp[0:-1])-32)/1.8:.2f}c")
#     elif tmp[-1] in ['c','C'] :
#         print(f"你的摄氏温度转化为华氏温度为->{eval(tmp[0:-1])*1.8+32:.2f}f")
#     else :
#         print("输入格式不正确")


# def func(n) :
#     if n == 1:
#         return 1
#     return n * func(n-1)
# print(func(5))

# def getInput():
#     val = input("输入一系列成绩,以空格分隔,回车结束")
#     val = val.split()
#     return val

# def getAvg(val):
#     sum = 0.0
#     size = len(val)
#     for au in val:
#         sum += eval(au)
#     return sum / size

# def getMean(val,avg):
#     size = len(val)
#     tmp = 0.0
#     for au in val:
#         tmp += (eval(au)-avg)**2
#     return pow(tmp/size,0.5)

# def getMid(val):
#     val = sorted(val)
#     size = len(val)
#     if(size % 2 == 0):
#         return (eval(val[size//2-1])+eval(val[size//2])) / 2

#     else :
#         return eval(val[size//2])

# val = getInput()
# avg = getAvg(val)
# mean = getMean(val,avg)
# mid = getMid(val)

# print(f"平均值:{avg:.2f} ,标准差:{mean:.2f},中位数:{mid:.2f}")
# print (type(avg))
# print (type(mean))
# print (type(mid))


file = open("my_file.txt",'r+')

txt = file.read()

txt.replace(',',' ').replace('.',' ')
txt_lower = txt.lower()
txt = txt.split()

dict = {}
for val in txt:
    if val in ["fox","dog", "sentence","letters","alphabet","tricks","wild","owners","food","diversity"] :
        dict[val] = dict.get(val,0)+1


# print(dict.items())
for word,counts in sorted(txt.items()):
    print(f"{word}:{counts} ")

file.close()
#print(txt)
# print(dict)
    

    

